﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StringHelper.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   String helper - helper methods for use with string class.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Common.Helpers
{
    /// <summary>
    /// String helper class
    /// </summary>
    public static class StringHelper
    {
        /// <summary>
        /// Trims the leading and trailing space from a string, if the string is null, null is returned.
        /// </summary>
        /// <param name="value">
        /// The value to be trimmed.
        /// </param>
        /// <returns>
        /// Returns the trimmed value or null.
        /// </returns>
        public static string Trim(string value)
        {
            return value == null ? value : value.Trim();
        }
    }
}